﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="_lideresEquipos.ascx.cs" Inherits="BoxScore.equipo._lideresEquipos" %>

<h2>Lideres Ofensivos</h2>


<asp:UpdatePanel ID="lideresofensivos" runat="server">
    <ContentTemplate>
    
    
<table>
    <tr>
        <th colspan="3">Carrera por la Triple Corona</th>
    </tr>
    <tr>
        <td>
            <center><h3>Lideres de Bateo</h3></center>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                DataSourceID="ObjectDataSource1">
                <Columns>
                    <asp:TemplateField HeaderText="Jugador" SortExpression="id_player">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("id_player") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" 
                                NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("id_player", "{0}") + "&torneo=" + Request["torneo"] %>' 
                                Text='<%# Eval("nombre", "{0}") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="average" HeaderText="AVG" SortExpression="average" DataFormatString="{0:F0}" />
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                SelectMethod="getOffensiveLeadersByTeam" 
                TypeName="BoxScore.Model.BoxScoreBD">
                <SelectParameters>
                    <asp:QueryStringParameter Name="idTeam" QueryStringField="equipo" 
                        Type="Int32" />
                    <asp:Parameter DefaultValue="1" Name="idRenglon" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </td>
        <td>
        <center><h3>Lideres de HR</h3></center>
        
            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                DataSourceID="ObjectDataSource2">
                <Columns>
                    <asp:TemplateField HeaderText="Jugador" SortExpression="id_player">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("id_player") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" 
                                NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("id_player", "{0}") + "&torneo=" + Request["torneo"] %>' 
                                Text='<%# Eval("nombre", "{0}") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="hr" HeaderText="HR" SortExpression="hr" />
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
                SelectMethod="getOffensiveLeadersByTeam" 
                TypeName="BoxScore.Model.BoxScoreBD">
                <SelectParameters>
                    <asp:QueryStringParameter Name="idTeam" QueryStringField="equipo" 
                        Type="Int32" />
                    <asp:Parameter DefaultValue="2" Name="idRenglon" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        
        
        </td>
        <td>
        <center><h3>Lideres de RBI</h3></center>
            <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
                DataSourceID="ObjectDataSource3">
                <Columns>
                    <asp:TemplateField HeaderText="Jugador" SortExpression="id_player">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("id_player") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" 
                                NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("id_player", "{0}") + "&torneo=" + Request["torneo"] %>' 
                                Text='<%# Eval("nombre", "{0}") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="rbi" HeaderText="RBI's" SortExpression="rbi" />
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
                SelectMethod="getOffensiveLeadersByTeam" 
                TypeName="BoxScore.Model.BoxScoreBD">
                <SelectParameters>
                    <asp:QueryStringParameter Name="idTeam" QueryStringField="equipo" 
                        Type="Int32" />
                    <asp:Parameter DefaultValue="3" Name="idRenglon" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        
        </td>
    </tr>
    
</table>
    
    
    
    
    </ContentTemplate>

</asp:UpdatePanel>




<h2>Lideres Pitcheo</h2>


<asp:UpdatePanel runat="server" ID="lideresPitcheo">
    <ContentTemplate>

<table>
    <tr>
        <th colspan="3">Carrera por la Triple Corona</th>
    </tr>
    <tr>
        <td>
            <center><h3>Lideres de Victorias</h3></center>
            <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
                DataSourceID="ObjectDataSource4">
                <Columns>
                    <asp:TemplateField HeaderText="Jugador" SortExpression="id_player">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("id_player") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HiddenField ID="HiddenField1" runat="server" 
                                Value='<%# Eval("id_player", "{0}") %>' />
                            <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                                DataSourceID="ObjectDataSource10" GridLines="None">
                                <Fields>
                                    <asp:TemplateField ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="HyperLink2" runat="server" 
                                                NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("id", "{0}") + "&torneo=" + Request["torneo"] %>' 
                                                Text='<%# Eval("first_name", "{0}") + " " + Eval("last_name", "{0}") %>'></asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Fields>
                            </asp:DetailsView>
                            <asp:ObjectDataSource ID="ObjectDataSource10" runat="server" 
                                SelectMethod="getJugador" TypeName="BoxScore.Model.BoxScoreBD">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="0" Name="idliga" Type="Int32" />
                                    <asp:ControlParameter ControlID="HiddenField1" DefaultValue="" Name="idplayer" 
                                        PropertyName="Value" Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="w" HeaderText="W" SortExpression="w" />
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource4" runat="server" 
                SelectMethod="getPitchingLeadersByTeam" 
                TypeName="BoxScore.Model.BoxScoreBD">
                <SelectParameters>
                    <asp:QueryStringParameter Name="idTeam" QueryStringField="equipo" 
                        Type="Int32" />
                    <asp:Parameter DefaultValue="1" Name="idRubro" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </td>
        <td>
        <center><h3>Lideres de SO</h3></center>

            <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False" 
                DataSourceID="ObjectDataSource5">
                <Columns>
                    <asp:TemplateField HeaderText="Jugador" SortExpression="id_player">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("id_player") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HiddenField ID="HiddenField1" runat="server" 
                                Value='<%# Eval("id_player", "{0}") %>' />
                            <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                                DataSourceID="ObjectDataSource11" GridLines="None">
                                <Fields>
                                    <asp:TemplateField ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="HyperLink2" runat="server" 
                                                NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("id", "{0}") + "&torneo=" + Request["torneo"] %>' 
                                                Text='<%# Eval("first_name", "{0}") + " " + Eval("last_name", "{0}") %>'></asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Fields>
                            </asp:DetailsView>
                            <asp:ObjectDataSource ID="ObjectDataSource11" runat="server" 
                                SelectMethod="getJugador" TypeName="BoxScore.Model.BoxScoreBD">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="0" Name="idliga" Type="Int32" />
                                    <asp:ControlParameter ControlID="HiddenField1" DefaultValue="" Name="idplayer" 
                                        PropertyName="Value" Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="so" HeaderText="SO" SortExpression="so" />
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource5" runat="server" 
                SelectMethod="getPitchingLeadersByTeam" 
                TypeName="BoxScore.Model.BoxScoreBD">
                <SelectParameters>
                    <asp:QueryStringParameter Name="idTeam" QueryStringField="equipo" 
                        Type="Int32" />
                    <asp:Parameter DefaultValue="2" Name="idRubro" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        
        
        
        </td>
        <td>
        <center><h3>Lideres de ERA</h3></center>
                    <asp:GridView ID="GridView6" runat="server" AutoGenerateColumns="False" 
                DataSourceID="ObjectDataSource6">
                <Columns>
                    <asp:TemplateField HeaderText="Jugador" SortExpression="id_player">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("id_player") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HiddenField ID="HiddenField1" runat="server" 
                                Value='<%# Eval("id_player", "{0}") %>' />
                            <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                                DataSourceID="ObjectDataSource12" GridLines="None">
                                <Fields>
                                    <asp:TemplateField ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="HyperLink2" runat="server" 
                                                NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" + Eval("id", "{0}") + "&torneo=" + Request["torneo"] %>' 
                                                Text='<%# Eval("first_name", "{0}") + " " + Eval("last_name", "{0}") %>'></asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Fields>
                            </asp:DetailsView>
                            <asp:ObjectDataSource ID="ObjectDataSource12" runat="server" 
                                SelectMethod="getJugador" TypeName="BoxScore.Model.BoxScoreBD">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="0" Name="idliga" Type="Int32" />
                                    <asp:ControlParameter ControlID="HiddenField1" DefaultValue="" Name="idplayer" 
                                        PropertyName="Value" Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="average" HeaderText="ERA" SortExpression="average" 
                        DataFormatString="{0:F3}" />
                </Columns>
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource6" runat="server" 
                SelectMethod="getPitchingLeadersByTeam" 
                TypeName="BoxScore.Model.BoxScoreBD">
                <SelectParameters>
                    <asp:QueryStringParameter Name="idTeam" QueryStringField="equipo" 
                        Type="Int32" />
                    <asp:Parameter DefaultValue="3" Name="idRubro" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>

        </td>
    </tr>
    
</table>
    
    
    
    </ContentTemplate>

</asp:UpdatePanel>
